/*************************************************************************
	> File Name: 001.计算n的阶乘.c
	> Author: Maureen 
	> Mail: Maureen@qq.com 
	> Created Time: 日  8/22 20:51:21 2021
 ************************************************************************/

#include <stdio.h>

int fac(int n) {
    if (n == 1) return 1;
    return n * fac(n - 1);
}

int main() {
    int n;
    while (~scanf("%d", &n)) {
        printf("fac(%d) = %d\n", n, fac(n));
    }
    return 0;
}
